<?php
// +---------------------------------------------------------------------------------
// | ApiAdmin [ JUST FOR API ]
// +---------------------------------------------------------------------------------
// | Copyright (c) 2017~2020 https://www.apiadmin.org/ All rights reserved.
// +---------------------------------------------------------------------------------
// | Licensed ( https://gitee.com/apiadmin/ApiAdmin/blob/master/LICENSE.txt )
// +---------------------------------------------------------------------------------
// | Author: zhaoxiang <zhaoxiang051405@gmail.com>
// +---------------------------------------------------------------------------------

use think\facade\Route;

Route::group('api', function() {
    Route::rule('BuildToken/getAccessToken','api.BuildToken/getAccessToken', 'POST')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('Captcha/send','api.Captcha/send', 'POST')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('Passport/modifyPassword','api.Passport/modifyPassword', 'POST')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('Passport/modifyPhone','api.Passport/modifyPhone', 'POST')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('Upload/image','api.Upload/image', 'POST')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('Dormitory/dynamicList','api.Dormitory/dynamicList', 'GET')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('Passport/captchaLogin','api.Passport/captchaLogin', 'POST')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('Passport/login','api.Passport/login', 'POST')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('Staff/apply','api.Staff/apply', 'POST')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('Staff/account','api.Staff/account', 'GET')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('SignIn/record','api.SignIn/record', 'GET')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('SignIn/submit','api.SignIn/submit', 'POST')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('Dormitory/dormitoryNumberByBlue','api.Dormitory/dormitoryNumberByBlue', 'POST')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('DoorLock/code','api.DoorLock/code', 'GET')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('DoorLock/tempPassword','api.DoorLock/tempPassword', 'GET')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('WxPassport/loginByPhone','api.WxPassport/loginByPhone', 'POST')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('WxApiIndex/toVisit','api.WxApiIndex/toVisit', 'POST')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('WxPassport/loginByVisit','api.WxPassport/loginByVisit', 'GET')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('WxApiIndex/visitDetail','api.WxApiIndex/visitDetail', 'GET')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('WxApiIndex/visitLogList','api.WxApiIndex/visitLogList', 'GET')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('Manager/logList','api.Manager/logList', 'GET')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('Staff/edit','api.Staff/edit', 'POST')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('Manager/visitCheck','api.Manager/visitCheck', 'POST')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('Manager/personalCenter','api.Manager/personalCenter', 'GET')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('Manager/personalUpdate','api.Manager/personalUpdate', 'POST')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('Manager/changePhone','api.Manager/changePhone', 'POST')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('System/info','api.System/info', 'GET')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('Manager/modifyPassword','api.Manager/modifyPassword', 'POST')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('Staff/synchronize','api.Staff/synchronize', 'POST')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('DoorLock/record','api.DoorLock/record', 'POST')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('DoorLock/clearList','api.DoorLock/clearList', '*')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('DoorLock/clearCardList','api.DoorLock/clearCardList', '*')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('Staff/IcCardList','api.Staff/IcCardList', 'GET')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('Staff/IcCardAdd','api.Staff/IcCardAdd', 'POST')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('Staff/IcCardDel','api.Staff/IcCardDel', 'GET')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('Staff/search','api.Staff/search', 'GET')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('DoorLock/recordList','api.DoorLock/recordList', 'GET')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('Parents/apply','api.Parents/apply', 'POST')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('Parents/login','api.Parents/login', 'POST')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('Parents/account','api.Parents/account', 'GET')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('Parents/addStudent','api.Parents/addStudent', 'POST')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('Parents/changeStatus','api.Parents/changeStatus', 'GET')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('Problem/type','api.Problem/type', 'GET')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('Problem/list','api.Problem/list', 'GET')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('Problem/report','api.Problem/report', 'POST')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('Problem/detail','api.Problem/detail', 'GET')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('Attendance/scopeList','api.Attendance/scopeList', 'GET')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('Attendance/checkIn','api.Attendance/checkIn', 'POST')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class]);
    Route::rule('Staff/faceSync','api.Staff/faceSync', 'POST')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('Staff/searchInDormitory','api.Staff/searchInDormitory', 'GET')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('System/version','api.System/version', 'GET')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('Staff/bindDeviceInfo','api.Staff/bindDeviceInfo', 'GET')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('Staff/unbindDevice','api.Staff/unbindDevice', 'GET')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('Parents/bindDeviceInfo','api.Parents/bindDeviceInfo', 'GET')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('Parents/unbindDevice','api.Parents/unbindDevice', 'GET')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('Passport/logout','api.Passport/logout', 'GET')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('Parents/logout','api.Parents/logout', 'GET')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('PayOrder/getPayOrder','api.PayOrder/getPayOrder', 'GET')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('PayOrder/uniformlyOrder','api.PayOrder/uniformlyOrder', 'POST')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('PayOrder/checkOrderStatus','api.PayOrder/checkOrderStatus', 'GET')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('Hydropower/getMeterData','api.Hydropower/getMeterData', 'GET')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('Passport/uploadHeader','api.Passport/uploadHeader', 'POST')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('DoorLock/clearCardList','api.DoorLock/clearCardList', '*')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('System/net_5g_info','api.System/net_5g_info', '*')->middleware([]);
    Route::rule('System/app_rotation','api.System/app_rotation', 'GET')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('System/home_info','api.System/home_info', 'GET')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('DoorLock/staffList','api.DoorLock/staffList', 'GET')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('DoorLock/uploadVoltage','api.DoorLock/uploadVoltage', 'POST')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('Dormitory/classList','api.Dormitory/classList', 'GET')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('PayOrder/rechargeRetry','api.PayOrder/rechargeRetry', 'POST')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('Dormitory/dormitoryApply','api.Dormitory/dormitoryApply', 'POST')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('Dormitory/dormitoryApplyGet','api.Dormitory/dormitoryApplyGet', 'GET')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('DoorLock/recordRkeList','api.DoorLock/recordRkeList', 'GET')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);
    Route::rule('Hydropower/getConsConsumeHistoryRecord','api.Hydropower/getConsConsumeHistoryRecord', 'GET')->middleware([app\middleware\ApiAuth::class, app\middleware\ApiPermission::class, app\middleware\RequestFilter::class, app\middleware\ApiLog::class]);

    Route::rule('Test/run','api.Test/run', 'GET')->middleware([]);

    //MISS路由定义
    Route::miss('api.Miss/index');
})->middleware(app\middleware\ApiResponse::class);
